<!-- HTML header for doxygen 1.8.14-->
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<meta name="generator" content="Doxygen 1.9.1"/>
<meta name="viewport" content="width=device-width, initial-scale=1"/>
<title>Unity ML-Agents Toolkit: IncomingMessage Class Reference</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="dynsections.js"></script>
<link href="navtree.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="resize.js"></script>
<script type="text/javascript" src="navtreedata.js"></script>
<script type="text/javascript" src="navtree.js"></script>
<link href="search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="search/searchdata.js"></script>
<script type="text/javascript" src="search/search.js"></script>
<link href="doxygenbase.css" rel="stylesheet" type="text/css" />
<link href="unity.css" rel="stylesheet" type="text/css"/>
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
 <tbody>
 <tr style="height: 56px;">
  <td id="projectlogo"><img alt="Logo" src="logo.png"/></td>
  <td id="projectalign" style="padding-left: 0.5em;">
   <div id="projectname">Unity ML-Agents Toolkit
   </div>
  </td>
 </tr>
 </tbody>
</table>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.9.1 -->
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&amp;dn=gpl-2.0.txt GPL-v2 */
var searchBox = new SearchBox("searchBox", "search",false,'Search','.html');
/* @license-end */
</script>
<script type="text/javascript" src="menudata.js"></script>
<script type="text/javascript" src="menu.js"></script>
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&amp;dn=gpl-2.0.txt GPL-v2 */
$(function() {
  initMenu('',true,false,'search.php','Search');
  $(document).ready(function() { init_search(); });
});
/* @license-end */</script>
<div id="main-nav"></div>
</div><!-- top -->
<div id="side-nav" class="ui-resizable side-nav-resizable">
  <div id="nav-tree">
    <div id="nav-tree-contents">
      <div id="nav-sync" class="sync"></div>
    </div>
  </div>
  <div id="splitbar" style="-moz-user-select:none;" 
       class="ui-resizable-handle">
  </div>
</div>
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&amp;dn=gpl-2.0.txt GPL-v2 */
$(document).ready(function(){initNavTree('classUnity_1_1MLAgents_1_1SideChannels_1_1IncomingMessage.html',''); initResizable(); });
/* @license-end */
</script>
<div id="doc-content">
<!-- window showing the filter options -->
<div id="MSearchSelectWindow"
     onmouseover="return searchBox.OnSearchSelectShow()"
     onmouseout="return searchBox.OnSearchSelectHide()"
     onkeydown="return searchBox.OnSearchSelectKey(event)">
</div>

<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<iframe src="javascript:void(0)" frameborder="0" 
        name="MSearchResults" id="MSearchResults">
</iframe>
</div>

<div class="header">
  <div class="summary">
<a href="#pub-methods">Public Member Functions</a> &#124;
<a href="classUnity_1_1MLAgents_1_1SideChannels_1_1IncomingMessage-members.html">List of all members</a>  </div>
  <div class="headertitle">
<div class="title">IncomingMessage Class Reference</div>  </div>
</div><!--header-->
<div class="contents">

<p>Utility class for reading the data sent to the <a class="el" href="classUnity_1_1MLAgents_1_1SideChannels_1_1SideChannel.html" title="Side channels provide an alternative mechanism of sending/receiving data from Unity to Python that is...">SideChannel</a>.  
 <a href="classUnity_1_1MLAgents_1_1SideChannels_1_1IncomingMessage.html#details">More...</a></p>

<p>Inherits IDisposable.</p>
<table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="pub-methods"></a>
Public Member Functions</h2></td></tr>
<tr class="memitem:a646092ffab3f73fc41b970b5b8285d20"><td class="memItemLeft" align="right" valign="top">&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classUnity_1_1MLAgents_1_1SideChannels_1_1IncomingMessage.html#a646092ffab3f73fc41b970b5b8285d20">IncomingMessage</a> (byte[] data)</td></tr>
<tr class="memdesc:a646092ffab3f73fc41b970b5b8285d20"><td class="mdescLeft">&#160;</td><td class="mdescRight">Construct an <a class="el" href="classUnity_1_1MLAgents_1_1SideChannels_1_1IncomingMessage.html" title="Utility class for reading the data sent to the SideChannel.">IncomingMessage</a> from the byte array.  <a href="classUnity_1_1MLAgents_1_1SideChannels_1_1IncomingMessage.html#a646092ffab3f73fc41b970b5b8285d20">More...</a><br /></td></tr>
<tr class="separator:a646092ffab3f73fc41b970b5b8285d20"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a87ad098b7c08f2c08963773960a17f65"><td class="memItemLeft" align="right" valign="top">bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classUnity_1_1MLAgents_1_1SideChannels_1_1IncomingMessage.html#a87ad098b7c08f2c08963773960a17f65">ReadBoolean</a> (bool defaultValue=false)</td></tr>
<tr class="memdesc:a87ad098b7c08f2c08963773960a17f65"><td class="mdescLeft">&#160;</td><td class="mdescRight">Read a boolean value from the message.  <a href="classUnity_1_1MLAgents_1_1SideChannels_1_1IncomingMessage.html#a87ad098b7c08f2c08963773960a17f65">More...</a><br /></td></tr>
<tr class="separator:a87ad098b7c08f2c08963773960a17f65"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a6dabf3ee1a9e47a217fb5847f7f3057e"><td class="memItemLeft" align="right" valign="top">int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classUnity_1_1MLAgents_1_1SideChannels_1_1IncomingMessage.html#a6dabf3ee1a9e47a217fb5847f7f3057e">ReadInt32</a> (int defaultValue=0)</td></tr>
<tr class="memdesc:a6dabf3ee1a9e47a217fb5847f7f3057e"><td class="mdescLeft">&#160;</td><td class="mdescRight">Read an integer value from the message.  <a href="classUnity_1_1MLAgents_1_1SideChannels_1_1IncomingMessage.html#a6dabf3ee1a9e47a217fb5847f7f3057e">More...</a><br /></td></tr>
<tr class="separator:a6dabf3ee1a9e47a217fb5847f7f3057e"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:aa885d05e7484ee66fc6a1ac7f588aa15"><td class="memItemLeft" align="right" valign="top">float&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classUnity_1_1MLAgents_1_1SideChannels_1_1IncomingMessage.html#aa885d05e7484ee66fc6a1ac7f588aa15">ReadFloat32</a> (float defaultValue=0.0f)</td></tr>
<tr class="memdesc:aa885d05e7484ee66fc6a1ac7f588aa15"><td class="mdescLeft">&#160;</td><td class="mdescRight">Read a float value from the message.  <a href="classUnity_1_1MLAgents_1_1SideChannels_1_1IncomingMessage.html#aa885d05e7484ee66fc6a1ac7f588aa15">More...</a><br /></td></tr>
<tr class="separator:aa885d05e7484ee66fc6a1ac7f588aa15"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ae12b02686b06943bfaa5a82e1fb46077"><td class="memItemLeft" align="right" valign="top">string&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classUnity_1_1MLAgents_1_1SideChannels_1_1IncomingMessage.html#ae12b02686b06943bfaa5a82e1fb46077">ReadString</a> (string defaultValue=default)</td></tr>
<tr class="memdesc:ae12b02686b06943bfaa5a82e1fb46077"><td class="mdescLeft">&#160;</td><td class="mdescRight">Read a string value from the message.  <a href="classUnity_1_1MLAgents_1_1SideChannels_1_1IncomingMessage.html#ae12b02686b06943bfaa5a82e1fb46077">More...</a><br /></td></tr>
<tr class="separator:ae12b02686b06943bfaa5a82e1fb46077"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ae49d134908c617c621726e8577321fcb"><td class="memItemLeft" align="right" valign="top">IList&lt; float &gt;&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classUnity_1_1MLAgents_1_1SideChannels_1_1IncomingMessage.html#ae49d134908c617c621726e8577321fcb">ReadFloatList</a> (IList&lt; float &gt; defaultValue=default)</td></tr>
<tr class="memdesc:ae49d134908c617c621726e8577321fcb"><td class="mdescLeft">&#160;</td><td class="mdescRight">Reads a list of floats from the message.  <a href="classUnity_1_1MLAgents_1_1SideChannels_1_1IncomingMessage.html#ae49d134908c617c621726e8577321fcb">More...</a><br /></td></tr>
<tr class="separator:ae49d134908c617c621726e8577321fcb"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ad99de23ba017821145b047c296e8b4dc"><td class="memItemLeft" align="right" valign="top">byte[]&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classUnity_1_1MLAgents_1_1SideChannels_1_1IncomingMessage.html#ad99de23ba017821145b047c296e8b4dc">GetRawBytes</a> ()</td></tr>
<tr class="memdesc:ad99de23ba017821145b047c296e8b4dc"><td class="mdescLeft">&#160;</td><td class="mdescRight">Gets the original data of the message.  <a href="classUnity_1_1MLAgents_1_1SideChannels_1_1IncomingMessage.html#ad99de23ba017821145b047c296e8b4dc">More...</a><br /></td></tr>
<tr class="separator:ad99de23ba017821145b047c296e8b4dc"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a6e2d745cdb7a7b983f861ed6a9a541a7"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classUnity_1_1MLAgents_1_1SideChannels_1_1IncomingMessage.html#a6e2d745cdb7a7b983f861ed6a9a541a7">Dispose</a> ()</td></tr>
<tr class="memdesc:a6e2d745cdb7a7b983f861ed6a9a541a7"><td class="mdescLeft">&#160;</td><td class="mdescRight">Clean up the internal storage.  <a href="classUnity_1_1MLAgents_1_1SideChannels_1_1IncomingMessage.html#a6e2d745cdb7a7b983f861ed6a9a541a7">More...</a><br /></td></tr>
<tr class="separator:a6e2d745cdb7a7b983f861ed6a9a541a7"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table>
<a name="details" id="details"></a><h2 class="groupheader">Detailed Description</h2>
<div class="textblock"><p>Utility class for reading the data sent to the <a class="el" href="classUnity_1_1MLAgents_1_1SideChannels_1_1SideChannel.html" title="Side channels provide an alternative mechanism of sending/receiving data from Unity to Python that is...">SideChannel</a>. </p>
</div><h2 class="groupheader">Constructor &amp; Destructor Documentation</h2>
<a id="a646092ffab3f73fc41b970b5b8285d20"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a646092ffab3f73fc41b970b5b8285d20">&#9670;&nbsp;</a></span>IncomingMessage()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="classUnity_1_1MLAgents_1_1SideChannels_1_1IncomingMessage.html">IncomingMessage</a> </td>
          <td>(</td>
          <td class="paramtype">byte[]&#160;</td>
          <td class="paramname"><em>data</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Construct an <a class="el" href="classUnity_1_1MLAgents_1_1SideChannels_1_1IncomingMessage.html" title="Utility class for reading the data sent to the SideChannel.">IncomingMessage</a> from the byte array. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">data</td><td></td></tr>
  </table>
  </dd>
</dl>

</div>
</div>
<h2 class="groupheader">Member Function Documentation</h2>
<a id="a6e2d745cdb7a7b983f861ed6a9a541a7"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a6e2d745cdb7a7b983f861ed6a9a541a7">&#9670;&nbsp;</a></span>Dispose()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void Dispose </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Clean up the internal storage. </p>

</div>
</div>
<a id="ad99de23ba017821145b047c296e8b4dc"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ad99de23ba017821145b047c296e8b4dc">&#9670;&nbsp;</a></span>GetRawBytes()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">byte [] GetRawBytes </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Gets the original data of the message. </p>
<p>Note that this will return all of the data, even if part of it has already been read.</p>
<dl class="section return"><dt>Returns</dt><dd></dd></dl>

</div>
</div>
<a id="a87ad098b7c08f2c08963773960a17f65"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a87ad098b7c08f2c08963773960a17f65">&#9670;&nbsp;</a></span>ReadBoolean()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">bool ReadBoolean </td>
          <td>(</td>
          <td class="paramtype">bool&#160;</td>
          <td class="paramname"><em>defaultValue</em> = <code>false</code></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Read a boolean value from the message. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">defaultValue</td><td>Default value to use if the end of the message is reached.</td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd></dd></dl>

</div>
</div>
<a id="aa885d05e7484ee66fc6a1ac7f588aa15"></a>
<h2 class="memtitle"><span class="permalink"><a href="#aa885d05e7484ee66fc6a1ac7f588aa15">&#9670;&nbsp;</a></span>ReadFloat32()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">float ReadFloat32 </td>
          <td>(</td>
          <td class="paramtype">float&#160;</td>
          <td class="paramname"><em>defaultValue</em> = <code>0.0f</code></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Read a float value from the message. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">defaultValue</td><td>Default value to use if the end of the message is reached.</td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd></dd></dl>

</div>
</div>
<a id="ae49d134908c617c621726e8577321fcb"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ae49d134908c617c621726e8577321fcb">&#9670;&nbsp;</a></span>ReadFloatList()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">IList&lt;float&gt; ReadFloatList </td>
          <td>(</td>
          <td class="paramtype">IList&lt; float &gt;&#160;</td>
          <td class="paramname"><em>defaultValue</em> = <code>default</code></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Reads a list of floats from the message. </p>
<p>The length of the list is stored in the message.</p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">defaultValue</td><td>Default value to use if the end of the message is reached.</td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd></dd></dl>

</div>
</div>
<a id="a6dabf3ee1a9e47a217fb5847f7f3057e"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a6dabf3ee1a9e47a217fb5847f7f3057e">&#9670;&nbsp;</a></span>ReadInt32()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">int ReadInt32 </td>
          <td>(</td>
          <td class="paramtype">int&#160;</td>
          <td class="paramname"><em>defaultValue</em> = <code>0</code></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Read an integer value from the message. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">defaultValue</td><td>Default value to use if the end of the message is reached.</td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd></dd></dl>

</div>
</div>
<a id="ae12b02686b06943bfaa5a82e1fb46077"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ae12b02686b06943bfaa5a82e1fb46077">&#9670;&nbsp;</a></span>ReadString()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">string ReadString </td>
          <td>(</td>
          <td class="paramtype">string&#160;</td>
          <td class="paramname"><em>defaultValue</em> = <code>default</code></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Read a string value from the message. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">defaultValue</td><td>Default value to use if the end of the message is reached.</td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd></dd></dl>

</div>
</div>
<hr/>The documentation for this class was generated from the following file:<ul>
<li><a class="el" href="IncomingMessage_8cs.html">IncomingMessage.cs</a></li>
</ul>
</div><!-- contents -->
</div><!-- doc-content -->
<!-- HTML footer for doxygen 1.8.14-->
<!-- start footer part -->
<div id="nav-path" class="navpath"><!-- id is needed for treeview function! -->
  <ul>
    <li class="navelem"><a class="el" href="namespaceUnity.html">Unity</a></li><li class="navelem"><a class="el" href="namespaceUnity_1_1MLAgents.html">MLAgents</a></li><li class="navelem"><a class="el" href="namespaceUnity_1_1MLAgents_1_1SideChannels.html">SideChannels</a></li><li class="navelem"><a class="el" href="classUnity_1_1MLAgents_1_1SideChannels_1_1IncomingMessage.html">IncomingMessage</a></li>
  </ul>
</div>
</body>
</html>
